package Chapter9;
import java.awt.*;
import java.awt.event.*;
public class Example04 {
	public static void main(String[] args) {
		Frame f=new Frame("my");
		f.setSize(400,300);
		f.setLocation(300, 200);
		f.setVisible(true);
		Button btn=new Button("EXIT");
		f.add(btn);
		btn.addMouseListener(new MouseAdapter() {
			public void mouseClicked(MouseEvent e) {
				System.exit(0);
			}
		});
	}

}
